<template>
  <el-dialog
    :title="title"
    :visible.sync="visible"
    :width="width"
    :close-on-click-modal="false"
  >
    <simpleInfoCard title="检查点信息">
      <template slot="contents">
        info1
      </template>
    </simpleInfoCard>
    <simpleInfoCard title="设备信息" style="margin-top: 20px">
      <template slot="contents">
        info2
      </template>
    </simpleInfoCard>
  </el-dialog>
</template>

<script>
import simpleInfoCard from '@/components/xm/simpleInfoCard'

export default {
  components: {
    simpleInfoCard
  },
  data() {
    return {
      model: {},
      visible: false,
      title: '',
      width: '480px'
    }
  },
  computed: {},
  watch: {
    visible: {
      handler(v) {
        if (v) {
          // 打开弹窗时
        }
      }
    }
  },
  created() {},
  mounted() {},
  methods: {
    show(rowData) {
      this.model = {}
      this.visible = true
      this.getDetails(rowData)
    },
    // 获取详情数据
    getDetails(rowData) {
      this.model = { ...rowData }
      console.log('调接口获取详情 this.model', this.model)
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog__body{
  padding: 10px 20px;
}
</style>
